package com.example.databindingdemo.listener;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Toast;

import com.example.databindingdemo.activity.BindAdapterActivity;

/**
 * @author: njb
 * @date: 2022/9/18 0:02
 * @desc:
 */
public class EventHandlerListener {
    private Context context;
    public EventHandlerListener(Context context) {
        this.context = context;
    }

    public void onButtonClicked(View view) {
        Toast.makeText(view.getContext(), "I am clicked!", Toast.LENGTH_SHORT).show();
        context.startActivity(new Intent(context, BindAdapterActivity.class));
    }
}
